Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  2008  Scripting  Games  Sudden  Death  Event  2  

 Content of 2008 Scripting Games Sudden Death Event 2.vbs
MD5 Hash: 2E285DCE8E7868977492DC7D751802F9
' This is my Solution for the Scripting Games 2008
' For more Information look at
' http://www.microsoft.com/technet/scriptcenter/funzone/games/games08.mspx

Option Explicit

Dim ofso : Set ofso = Createobject("Scripting.FileSystemObject")
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8


Call Main()


' ---------------------------------------
Sub Main()

Dim iCount, iCount2, xCount
Dim arrLines, arrChr
Dim vString

arrLines = ReadFileToArray("C:\Scripts\vertical.txt")

If IsArray(arrLines) then


xCount = Len(arrLines(0))

For iCount = 1 to xCount

For iCount2 = 0 to UBound(arrLines)

vString = vString & Mid(arrLines(iCount2),iCount,1)

Next
Next

msgbox vString

End if




End Sub


' ---------------------------------------
Private Function ReadFileToArray(strFile)

Dim strNextLine, arrstrList
Dim arrLines()
Dim iCount : iCount = 0

If ofso.FileExists(strFile) then

Dim oFile : Set oFile = ofso.OpenTextFile(strFile, ForReading)

Do Until oFile.AtEndOfStream

Redim Preserve arrLines(iCount)
arrLines(iCount) = oFile.ReadLine
iCount = iCount + 1

Loop

oFile.Close

End if

Set oFile = nothing

If IsArray(arrLines) then ReadFileToArray = arrLines

End Function


   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a